package com.sky.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sky.dto.DishDTO;
import com.sky.dto.DishPageQueryDTO;
import com.sky.entity.Dish;
import com.sky.result.PageResult;
import com.sky.result.Result;
import com.sky.vo.DishVO;

import java.util.List;

/**
 * ClassName: DishService
 * Description:
 *
 * @Author: Jdz
 * @Create: 2024/1/23 - 19:16
 */
public interface DishService {
    /**
     * 新增菜品和对应的口味
     * @param dishDTO
     * @return
     */
    Result saveWithFlavor(DishDTO dishDTO);

    Result<PageResult> pageQuery(DishPageQueryDTO pageQueryDTO);

    Result deleteBatch(List<Long> ids);

    /**
     * 根据id查询菜品和对应的口味数据
     * @param id
     * @return
     */
    Result<DishVO> getByIdWithFlavor(Long id);

    Result updateWithFlavor(DishDTO dishDTO);

    Result<List<DishVO>> list(Long categoryId, String name);

    Result startOrStop(Integer status, Long id);
}
